package com.ling.pl.security.service;

import com.ling.pl.core.commons.support.DaoPage;
import com.ling.pl.security.model.DefaultPosition;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author bo.wang
 */
@Component(DefaultPositionService.BEAN_ID)
public class DefaultPositionService extends BaseDefaultPositionService {
    public DefaultPosition newPositionInstance(String positionId) {
        return new DefaultPosition(positionId);
    }

    public List<DefaultPosition> loadUserPositions(String username) {
        return defaultPositionDao.loadUserPositions(username);
    }

    public DefaultPosition loadPositionById(String positionId) {
        return defaultPositionDao.loadPositionById(positionId);
    }

    public DaoPage loadPagePositions(Map params, int pageIndex, int pageSize) {
        return defaultPositionDao.loadPagePositions(params, pageIndex, pageSize);
    }

    public List<DefaultPosition> loadPagePositions(Map params) {
        return defaultPositionDao.loadPagePositions(params);
    }

    public String uniqueCheck(String id) {
        return defaultPositionDao.uniqueCheck(id);
    }
}

